<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>

        var a = function () {
            console.log("123");
        }
        a();
        /*
            函数对象（）
            函数定义完，立即被调用，叫做立即执行函数
         */
        (  
            function (a, b) 
            {
                console.log(a + b);
            }
        )(1, 2)

        var duixiang = new Promise(function (resovle, reject) {
            if(1==10){
                resovle('success')
            }else{
                reject('error')
            }
        }).then(res=>{
            console.log();
        })

    </script>
</head>

<body>

</body>

</html>